vcLinkNode

Link node is a node added to component's structure and is mainly used to define joints and other mechanisms of movement in a component.

See in: Overview

Module: vcCore

Parent: vcNode

Children -

Referenced by: vcComponent.createLink(), vcLinkJoint.ChildNode

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
DofvcDofRGets the degree-of-freedom (DOF) object that defines the joint properties of the node and its mechanism of movement. If joint type is fixed, Dof will be None.
JointTypevcJointTypeRWGets or sets the node's joint type
Jointslist[vcLinkJoint]RGets a list of link joints associated with this link node. Returns joints where this link is the vcLinkJoint.ChildNode
OffsetvcMatrixExpressionPropertyRGets the expression property that, when evaluated, returns the node's offset.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
createJointvcLinkJointvcLinkJointType typeCreates a new joint associated with this link.
See more
Parameters:
type (vcLinkJointType): The type of joint to create.

Returns:
vcLinkJoint: The newly created joint.

Example: Listen Joint Value Update Events

""" This example shows how to continuously check an event value in a while loop.

DISCLAIMER: it's not often performance-wise recommended to rely on 
high interval based logic if not necessary.
"""

import vcCore as vc


async def OnRun():
  comp = vc.getComponent()
  x_link = comp.findNode("X_link")
  
  while True:
    await x_link.OnNodeTransform.wait()    # any vcEvent found in the API can be waited.
    if x_link.Dof.VALUE > 100:
      await delay(1) # on position, do some task